<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
             /* 设置当前网页的视距为800px，人眼距离网页的距离 */
            perspective: 800px;
        }
        .cube{
            width: 400px;
            height: 400px;
            margin: 150px auto;
            /* transform默认情况下是2d变形  如果想要设置3d变形效果需要设置 transform-style: preserve-3d;*/
            transform-style: preserve-3d;
            animation: rotate 3s  linear infinite;
        }

        .cube > div{
            opacity: .8;
            position: absolute;
        }

        img{
            width: 400px;
            height: 400px;
            vertical-align: top;
        }
        .box1{
            transform: rotateY(90deg) translateZ(200px);
        }
        .box2{
            transform: rotateY(-90deg) translateZ(200px);
        }
        .box3{
            transform: rotateX(90deg) translateZ(200px);
        }
        .box4{
            transform: rotateX(-90deg) translateZ(200px);
        }
        .box5{
            transform: rotateX(0deg) translateZ(-200px);
        }
        .box6{
            transform:translateZ(200px) rotateY(180deg) ;
        }  
    @keyframes rotate{
        from{
            transform: rotateX(0) rotateZ(0);
        }
        to{
            /* turn表示转一圈 */
            transform: rotateX(1turn) rotateZ(1turn);
        }
    }

    </style>
</head>
<body>
    <!-- 创建一个外部的容器 -->
    <div class="cube">
        <!-- 引入图片 -->
        <div class="box1">
            <img src="./images/1.jpeg" alt="">
        </div>

        <div class="box2">
            <img src="./images/2.jpeg" alt="">
        </div>

         <div class="box3">
            <img src="./images/3.jpeg" alt="">
        </div>

        <div class="box4">
            <img src="./images/4.jpeg" alt="">
        </div>

        <div class="box5">
            <img src="./images/5.jpeg" alt="">
        </div>

        <div class="box6">
            <img src="./images/6.jpeg" alt="">
        </div>  
    </div>
</body>
</html>